development_flag = False


# development_flag = True


class Config:
    db_driver = "mysql"
    db_user = "root_jcth"
    if development_flag:
        db_user = "root"
    db_password = "Root_jcth147258"
    if development_flag:
        db_password = "ROOT"
    db_host = "rm-2vckbf741vbd9uh18.mysql.cn-chengdu.rds.aliyuncs.com"
    if development_flag:
        db_host = "localhost"
    db_port = "3306"
    db_name = "community_pro"
    DEBUG = True
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    SQLALCHEMY_DATABASE_URI = '{}://{}:{}@{}/{}'.format(db_driver, db_user, db_password, db_host, db_name)
    print(SQLALCHEMY_DATABASE_URI)
    SQLALCHEMY_COMMIT_ON_TEARDOWN = True
